org.eclipse.vtp.framework.common.services
Class ScriptableExecutionContext
java.lang.Object
org.eclipse.vtp.framework.common.services.ScriptableExecutionContext
- All Implemented Interfaces:
- IScriptable
public class ScriptableExecutionContext
- extends java.lang.Object
- implements IScriptable
An IScriptable implementation that makes the
IExecutionContext instance available as a scripting object.
This service will make available a "Execution" object to all scripts in its
scope. The variable supports the following properties:
id: a string containing the execution ID
parameters: an object containing the execution
parameters
The parameters object listed above will have a property for each execution
parameter defined in the execution context. New parameters may be added by
assigning to non-existent properties of the object. The parameters object
will not have an implicit value.
The "Execution" scripting object uses the execution ID as the implicit value,
thus it can be compared to other string objects.
- Author:
- Lonnie Pryor
- See Also:
IExecutionContext
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptableExecutionContext
public ScriptableExecutionContext(IExecutionContext context)
- Creates a new ScriptableExecutionContext.
- Parameters:
context - The context to provide scripting services for.
getName
public final java.lang.String getName()
- Specified by:
getName in interface IScriptable
hasValue
public boolean hasValue()
- Specified by:
hasValue in interface IScriptable
toValue
public java.lang.Object toValue()
- Specified by:
toValue in interface IScriptable
getFunctionNames
public final java.lang.String[] getFunctionNames()
- Specified by:
getFunctionNames in interface IScriptable
invokeFunction
public final java.lang.Object invokeFunction(java.lang.String name,
java.lang.Object[] arguments)
- Specified by:
invokeFunction in interface IScriptable
hasItem
public final boolean hasItem(int index)
- Specified by:
hasItem in interface IScriptable
hasEntry
public final boolean hasEntry(java.lang.String name)
- Specified by:
hasEntry in interface IScriptable
getItem
public final java.lang.Object getItem(int index)
- Specified by:
getItem in interface IScriptable
getEntry
public final java.lang.Object getEntry(java.lang.String name)
- Specified by:
getEntry in interface IScriptable
setItem
public final boolean setItem(int index,
java.lang.Object value)
- Specified by:
setItem in interface IScriptable
setEntry
public final boolean setEntry(java.lang.String name,
java.lang.Object value)
- Specified by:
setEntry in interface IScriptable
clearItem
public final boolean clearItem(int index)
- Specified by:
clearItem in interface IScriptable
clearEntry
public final boolean clearEntry(java.lang.String name)
- Specified by:
clearEntry in interface IScriptable